/* 科技感开关样式 */
:deep(.el-switch) {
  --el-switch-on-color: #00D1ED;
  --el-switch-off-color: rgba(25, 65, 102, 0.8);
  height: 24px;
  position: relative;
  
  .el-switch__core {
    border: 1px solid rgba(64, 76, 88, 0.6);
    background: linear-gradient(180deg, rgba(23, 32, 41, 0.5) 0%, rgba(32, 45, 58, 0.6) 100%);
    backdrop-filter: blur(12px);
    height: 24px;
    border-radius: 12px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3), 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 50px;
    position: relative;
    
    &::before {
      content: 'OFF';
      position: absolute;
      right: 7px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 10px;
      color: rgba(255, 255, 255, 0.5);
      z-index: 1;
      transition: opacity 0.3s ease;
    }
    
    &::after {
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      background-color: #848e9a;
      border-radius: 50%;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
      transition: all 0.3s cubic-bezier(0.34, 1.61, 0.7, 1);
      z-index: 2;
      
      &::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
      }
    }
  }
  
  &.is-checked {
    .el-switch__core {
      border: 1px solid rgba(0, 209, 237, 0.7);
      background: linear-gradient(180deg, rgba(0, 209, 237, 0.2) 0%, rgba(0, 209, 237, 0.3) 100%);
      box-shadow: 0 0 8px rgba(0, 209, 237, 0.5), inset 0 0 10px rgba(0, 209, 237, 0.2);
      
      &::before {
        content: 'ON';
        left: 9px;
        right: auto;
        color: rgba(255, 255, 255, 0.9);
      }
      
      &::after {
        transform: translateX(calc(100% - 2px));
        background-color: #00D1ED;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 12px rgba(0, 209, 237, 0.9);
        
        &::before {
          opacity: 1;
          background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
        }
      }
    }
    
    .switch-beam {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      background: linear-gradient(90deg, transparent 30%, rgba(0, 209, 237, 0.4) 50%, transparent 70%);
      animation: switch-beam 2s infinite linear;
      z-index: 0;
      border-radius: 12px;
    }
  }
  
  &.is-disabled {
    opacity: 0.6;
    
    .el-switch__core {
      border-color: rgba(25, 65, 102, 0.4);
      box-shadow: none;
      cursor: not-allowed;
      
      &::after {
        background-color: #ccc;
        box-shadow: none;
      }
      
      &::before {
        opacity: 0.5;
      }
    }
  }
}

@keyframes switch-beam {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* 开关包装器 */
.switch-wrapper {
  position: relative;
  display: inline-block;
}

/* 光束动画元素 */
.switch-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 30%, rgba(0, 209, 237, 0.4) 50%, transparent 70%);
  animation: switch-beam 2s infinite linear;
  z-index: 0;
  border-radius: 12px;
}
